//
//  LocalUser.m
//  WDFans
//
//  Created by test test on 4/24/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "LocalUser.h"

@implementation LocalUser

@synthesize name = name_;
@synthesize pwd = pwd_;
@synthesize isAuto = isAuto_;
@synthesize textSize = textSize_;
@synthesize loginDate = loginDate_;

- (id)init
{
    if(self = [super init])
    {
        self.textSize = kFontMiddle;
    }
    return self;
}

- (void)dealloc
{
    [name_ release];
    [pwd_ release];
    [loginDate_ release];
    [super dealloc];
}

#pragma NSCoding delegate
- (void)encodeWithCoder:(NSCoder *)aCoder
{
	[aCoder encodeObject:name_ forKey:@"name"];
	[aCoder encodeObject:pwd_ forKey:@"pwd"];
	[aCoder encodeObject:loginDate_ forKey:@"loginDate"];
	[aCoder encodeBool:isAuto_ forKey:@"isAuto"];
    [aCoder encodeInt:textSize_ forKey:@"textSize"];
}

- (id)initWithCoder:(NSCoder *)aDecoder{
	if (self = [super init]){
		self.name = [aDecoder decodeObjectForKey:@"name"];
		self.pwd = [aDecoder decodeObjectForKey:@"pwd"];
		self.loginDate = [aDecoder decodeObjectForKey:@"loginDate"];
		self.isAuto = [aDecoder decodeBoolForKey:@"isAuto"];
		self.textSize = [aDecoder decodeIntForKey:@"textSize"];
	}
	return self;
}
@end
